<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
$tabs=array(
	array('op'=>'basic','title'=>'基本参数设置'),
);
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_cmsphoto/index/'),
		array('title'=>'分类','icon'=>'icon-all','action'=>'jy_cmsphoto/classify/'),
		array('title'=>'上传','icon'=>'icon-shangyi','action'=>'jy_cmsphoto/up/'),
	);
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'tabs'=>$tabs,
		'edit'=>array(
			array('type'=>'string','title'=>'相册名称','name'=>'title'),
			array('type'=>'string','title'=>'相册展自定义','name'=>'photitle','help'=>'默认：相册展'),
			array('type'=>'switch','title'=>'关闭顶部返回？','name'=>'iscms','help'=>'关闭左上角会出现浮动返回门户按钮！'),
			array('type'=>'switch','title'=>'上传相册审核','name'=>'shenhe','help'=>''),
			array('type'=>'switch','title'=>'首页分类关闭？','name'=>'no_group','help'=>''),
			array('type'=>'switch','title'=>'关闭上传功能？','name'=>'no_up','help'=>''),
			array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
			array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
			array('type'=>'image','title'=>'分享图片','name'=>'share_image','help'=>'建议尺寸：高320px*宽640px'),
				
			array(
					'type'=>'array',
					'name'=>'image',
					'add_tip'=>'添加一个幻灯片',
						'list'=>array(
							array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
							array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
							
						),
						'details'=>array(
							array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
							array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
							
						)
			),
			array(
				'type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
			),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
